var LeftnavCtrl = dojo.declare(null, {
	//constructor/destructor
	constructor : leftnavCtrl_constructor,
	destroy : leftnavCtrl_destructor,
	
	//methods
	init : leftnavCtrl_init,
	loadContentPage : leftnavCtrl_loadContentPage,
	
	//signals
	sigLoadContentPage : leftnavCtrl_sigLoadContentPage,
	
	//slots
	updateLoginState : leftnavCtrl_updateLoginState
});

function leftnavCtrl_constructor(){
	var obj = this;
	
	obj._homepageCtrl = null;
	
	//Structer of contentPageParameter: {pageName : [name of base floater, floater parameters]}
	obj._contentPageInfo = {"myloc" : ["my", {hideLook : {left : "310px", width : "700px", top : "100px", height : "100px"},
											  loadingLook : {left : "310px", width : "700px", top : "100px", height : "100px"},
											  defaultLook : {left : "310px", width : "700px", top : "100px", height : "500px"}}
									  ]
	};
	
	obj._connections = new Array();
}

function leftnavCtrl_destructor(){
	var obj = this;
	for (var i = 0; i < obj._connections.length; i ++) dojo.disconnect(obj._connections[i]);
}

function leftnavCtrl_init(parameter){
	var obj = this;
	
	obj._homepageCtrl = parameter.homepageController;
	
	obj._connections.push(dojo.connect(globalCtrl, "userLoginStateChanged", this, "updateLoginState"));
	obj._connections.push(dojo.connect(this, "sigLoadContentPage", obj._homepageCtrl, "loadContentPage"));
}

function leftnavCtrl_loadContentPage(page){
	var obj = this;
	obj.sigLoadContentPage(obj._contentPageInfo[page][0], page, obj._contentPageInfo[page][1]);
}

function leftnavCtrl_sigLoadContentPage(){
}

function leftnavCtrl_updateLoginState(){
}

if (dojo.getObject("leftnavCtrl") == null) leftnavCtrl = new LeftnavCtrl();
